using System.Collections.Specialized;
using System.Web.Mvc;
using System.Web.Routing;
using Moq.Mvc;

namespace RMH.UnitTests.Web.Binders
{
    public abstract class base_binding_test<T> : base_automock_test where T : ControllerBase
    {
        protected HttpContextMock context = new Moq.Mvc.HttpContextMock();
        protected NameValueCollection form = new NameValueCollection();

        protected object getBindingResult(IModelBinder binder)
        {
            return binder.BindModel(new ControllerContext(context.Object, new RouteData(),
                                                          RMH.Web.Container.Resolve<T>()), new ModelBindingContext());
        }
    }
}